#!/bin/bash

RINGBUFFER_FILE="../../src/ringbuffer/lockfree_ringbuffer.c"

echo "Analyzing ring buffer implementation..."
vsyncer info $RINGBUFFER_FILE

echo "Optimizing ring buffer implementation..."
vsyncer optimize -A -1 $RINGBUFFER_FILE

echo "Verifying optimization..."
vsyncer verify $RINGBUFFER_FILE

echo "Running ring buffer benchmarks..."
cd ../../
make
./build/tests/benchmark/bench_ringbuffer 